package com.ztom.agent.asm.plugin;

import com.ztom.agent.bean.InjectClassInfo;

import java.util.*;

/**
 * 单例的Set和Map, 用于存放plugins的信息
 *
 * @author ZhangTao
 */
public class PluginInfoHolder {

    private PluginInfoHolder() {
        // do nothing
    }

    public static Set<String> getClassSet() {
        return Holder.SET;
    }

    public static Map<String, List<InjectClassInfo>> getPluginMap() {
        return Holder.MAP;
    }

    private static class Holder {
        private static final Set<String> SET = new HashSet<>();
        private static final Map<String, List<InjectClassInfo>> MAP = new HashMap<>();
    }
}
